<?php
header('Content-Type:text/html;charset=utf-8');
require('../..//public/zscg.php');
require('../..//public/local.php');

$id=$_POST['sid'];
$post=array('leibie'=>$_POST['leibie'],'miaoshu'=>$_POST['miaoshu'],'zhuangtai'=>$_POST['zhuangtai']);
// var_dump($_POST);
$res=update($con,'fenlei',$id,$post);

if($res){
    echo "<script>alert('修改成功');window.location.href='/admin/fenlei/index.php'</script>";
}else{
    echo "<script>alert('修改失败');window.location.href='/admin/fenlei/update1.php'</script>";
}